/**
 * @Author: 杨军
 * @Date: 2019/11/12
 * @Last Modified by:
 * @Last Modified time: 2019-11-19 14:13:39
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取入库表数据
export const searchWarehouseReceiptInfos = params =>
  axios.get(`${SERVER.SEARCH_VEHICLE}/query/vehicleQuery/tabs/searchWarehouseReceiptInfos`, {
    params
  });

// 获取底盘动态查询列表数据
export const selectApiChassisDynamic = params =>
  axios.get(`${SERVER.VEHICLE}/query/vehicleQuery/tabs/selectApiChassisDynamic`, {
    params
  });

// 获取未完成行动列表数据
export const selectApiUnfinished = params =>
  axios.get(`${SERVER.VEHICLE}/query/vehicleQuery/tabs/searchApiUnfinished`, {
    params
  });

// 获取出库表数据
export const searchOutboundOrderInfos = params =>
  axios.get(`${SERVER.SEARCH_VEHICLE}/query/vehicleQuery/tabs/searchOutboundOrderInfos`, {
    params
  });

// 获取库存状态列表查询
export const searchInventoryStatusInfos = params =>
  axios.get(`${SERVER.SEARCH_VEHICLE}/query/vehicleQuery/tabs/searchInventoryStatusInfos`, {
    params,
    timeout: 500000
  });

// 获取 盈亏情况列表查询
export const searchProfitLossSituationInfos = params =>
  axios.get(`${SERVER.SEARCH_VEHICLE}/query/vehicleQuery/tabs/searchProfitLossSituationInfos`, {
    params
  });

// 获取 供应商列表
export const getSupperlierList = params =>
  axios.get(`${SERVER.DMSCLOUD_PART}/basedata/businessCustomer`, {
    params
  });

// 获取 车型 列表
export const getModelList = params =>
  axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/models`, {
    params
  });

export const getProductList = params =>
  axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/productInfo/query`, {
    params
  });

// 入库单导出
export const exportWarehouseReceiptInfos = params =>
  axios.get(`${SERVER.VEHICLE}/query/vehicleQuery/tabs/exportWarehouseReceiptInfos/excel`, {
    params,
    responseType: 'blob'
  });

// 出库单导出
export const exportOutboundOrderInfos = params =>
  axios.get(`${SERVER.VEHICLE}/query/vehicleQuery/tabs/exportOutboundOrderInfos/excel`, {
    params,
    responseType: 'blob'
  });

// 库存单导出
export const exportInventoryStatusInfos = params =>
  axios.get(`${SERVER.VEHICLE}/query/vehicleQuery/tabs/exportInventoryStatusInfos/excel`, {
    params,
    responseType: 'blob'
  });

// 盈亏情况导出
export const exportProfitLossSituationInfos = params =>
  axios.get(`${SERVER.VEHICLE}/query/vehicleQuery/tabs/exportProfitLossSituationInfos/excel`, {
    params,
    responseType: 'blob'
  });

// 库存状态保存
export const saveStockStatus = params => axios.post(`${SERVER.VEHICLE}/query/vehicleQuery/tabs/saveStockStatus`, params);
